//
//  AssociateViewController.m
//  OCTest
//
//  Created by 韩艳锋 on 2018/4/27.
//  Copyright © 2018年 韩艳锋. All rights reserved.
//

#import "AssociateViewController.h"
#import <objc/runtime.h>
@interface AssociateViewController ()

@end

@implementation AssociateViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    static char * a;
    
    objc_setAssociatedObject(self, a, @"myName", OBJC_ASSOCIATION_RETAIN);
    
    NSLog(@"%@", objc_getAssociatedObject(self, a));
}

@end
